package com.chenl.interview.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chenl.interview.model.dto.user.UserQueryRequest;
import com.chenl.interview.model.entity.User;
import com.chenl.interview.model.vo.LoginUserVO;

import java.util.List;

public interface UserService extends IService<User> {
    /**
     * 用户注册
     * @param userAccount
     * @param userPassword
     * @param checkPassword
     * @return
     */
    Long register(String userAccount, String userPassword, String checkPassword);

    /**
     * 用户登录
     * @param userAccount
     * @param userPassword
     * @return
     */
    LoginUserVO login(String userAccount, String userPassword,String header);

    /**
     * 获取查询条件
     *
     * @param userQueryRequest
     * @return
     */
    QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);

    /**
     * 添加用户签到记录
     * @param id
     * @return
     */
    boolean addUserSignIn(Long id);

    /**
     * 获取用户签到记录
     * @param id
     * @param year
     * @return
     */
    List<Integer> getUserSingIn(Long id, Integer year);
}
